Repository navigation
feat: AI 톤 교정 문체 열거형 · 문체별 지시문 (#64) - #83
Merged
Merged
Conversation
oTAETAEo
previously approved these changes
Nov 9, 2026
oTAETAEo
left a comment
Contributor
There was a problem hiding this comment.
고생 하셨습니다 !
사용자가 선택한 톤 스타일에 따라 공통 지시에 문체별 지시가 붙어서 요청이 나가는 것으로 이해했습니다.
switch 문이 좀 길어 보여서 템플릿 메서드 패턴으로 빼면 어떨까 싶었는데, 문체마다 다른 게 문자열뿐이라 그대로 둔 의도로 이해했습니당
지시문 문구(ToneCorrectionPrompt)와 표식을 이 클래스에 둔 판단
적절한 것 같습니다 ! 특정 톤 스타일만 출력 토큰 상한이 달라지거나 후처리가 붙는 등 문체별로 동작이 달라지면, 그때 분리하면 좋을 것 같은 생각 입니다아 👍
Contributor
Author
|
기획·프론트 답변을 반영해 커밋 3개를 추가했습니다 (a32e160, 9dd2861, b781b27). 이미 보셨다면 아래만 확인해 주세요.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
관련 이슈
작업 내용
AiErrorCode의AI422_1추가, 출력 토큰 상한 4000→6000 명세 수정은 [feat] AI 톤 교정 API #65ToneStyle(domain/ai/entity): 명세 6장의 상수 6개 (감성/에세이ESSAY삭제). 지시문이나 표시 이름 없이 상수만 둠ToneCorrectionPrompt(domain/ai/service, 패키지 비공개)systemPrompt(style): 공통 지시 +문체: {한국어 이름}+ 문체별 지시. 문체별 지시는 기본 분기 없는 switch 식이라 문체를 추가하고 지시를 빠뜨리면 컴파일이 깨짐userMessage(text):<text>\n원문\n</text>(FakeLanguageModelClient가 벗기는 형식)BLOCKED_MARKER = "[[SNIPTEXT_BLOCKED]]": 지시문 4번은 이 상수를 이어 붙여 만들어 판정과 문구가 어긋나지 않음isBlocked(modelText): TextWhitespace 기준으로 앞뒤 공백을 지운 뒤 표식과 정확히 같을 때만 참. null은 거짓기획·프론트 결정 반영 (a32e160 이후)
ESSAY상수·분기 삭제, 문체 6개AI422_1문구·설명 변경 (코드 반영은 #65)실제 모델 확인 중 함께 고친 것 (아래 '실제 모델 확인'의 1·2차 실패 대응)
명세와 달라진 점
이 PR에서 명세를 함께 고침 (
docs/s1-api-spec.md버전 표에 "v0.8 수정 (2026-11-10)" 행 추가)style설명에서ESSAY삭제AI422_1: 메시지 "부적절한 표현이 있어 교정할 수 없어요. 수정 후 다시 시도해 주세요.", 설명 "혐오·차별 표현 또는 욕설·비속어 감지. 횟수 미차감"CLAUDE.md의 횟수 처리 문장: "혐오 표현 차단" → "혐오 표현·욕설 차단"테스트
<text>감싸기, 가짜 클라이언트 결과가"[가짜 교정] " + 원문실제 모델 확인
claude-haiku-5-5, 요청 본문은 MessagesRequest와 같은 4개 필드, 생각 설정 기본값(조건 A)최종 결과 (3차)
</text>탈출 포함){{변수}}·날짜·시간·금액·수량 (4개)3643자, 11.413.4초**)를 씀 (지시문에서 금지했지만 이전 effort low 조건에서도 나온 현상). #65에서 후처리 여부 판단 필요회차별 경과
이전 확인에서 이어지는 결론
output_config.effort: low는 출력 토큰을 줄였지만 오차단·지시 응답·문장 삭제·금액 표기 변경·마크다운 사용이 생겨 기본값(A)을 쓰고global/client/llm은 고치지 않음#65에서 반영할 것
AiErrorCode에AI422_1추가 (문구는 위 명세 변경 그대로)CLAUDE.md의 "출력 토큰 상한 4000" 문구와 명세 22번 비고의 "출력 토큰 상한(4,000)" 수정#65에서 결정 필요
**) 후처리 여부확인 체크리스트
./gradlew build통과global공통 코드를 바꿨다면 디스코드에 공유함 (변경 없음)리뷰어에게
[중점] 지시문 문구(ToneCorrectionPrompt)와 표식을 이 클래스에 둔 판단. 실제 모델 결과는 '실제 모델 확인' 절 참고